import React, { useState } from 'react'
import App from './App'

function Appfather() {
   let [flag,setFLG] = useState(true)
   let fn = ()=>{
       setFLG(!flag)
   }
  return (
    <div>
        <button onClick = {fn}>点击创建或者销毁组件</button>
        {
            flag ?  <App></App> :""
        }
       
    </div>
  )
}

export default Appfather